package com.zy.cloud.service;

import com.zy.cloud.entity.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @ClassName: UserHystrixService
 * @Description: feign负载均衡接口
 * @Author: yanzy
 * @Date: 2021/3/3 22:14
 */
@Service
@FeignClient(value = "CLOUD-PROVIDER-SERVER", fallback = com.zy.cloud.service.impl.UserHystrixServiceImpl.class)
public interface UserHystrixService {

    @GetMapping("/hystrix/user/ok/{id}")
    String reqOk(@PathVariable("id") Integer id);

    @GetMapping("/hystrix/user/timeout/{id}")
    String reqTimeOut(@PathVariable("id") Integer id);
}
